<template>
	<view class="bgcfff">
		<view class="margin15">
			<!-- 搜索框 -->
			<view class="search">
				<input type="text" v-model="searchValue" placeholder="输入商品关键字或商家名称">
			</view>
			<!-- 轮播 -->
			<swiper class="swiper" :autoplay="true" :interval="3000" :duration="1000">
				<swiper-item>
					<view class="swiper-item"><img src="../../static/swiper1.png" alt=""></view>
				</swiper-item>
				<swiper-item>
					<view class="swiper-item"><img src="../../static/swiper1.png" alt=""></view>
				</swiper-item>
			</swiper>
			<!-- 菜单栏 -->
			<van-tabs color='#0256FF' line-width="31px" line-height="5px">
				<van-tab title-class="fs16" v-for="item in tabList" :title="item">
					<!-- 菜单栏内容 -->
					<view class="goodList">
						<!-- 每一项 -->
						<view class="goodList-item">
							<view class="goodList-item-img">
								<img src="../../static/wx.png" alt="">
							</view>
							<view class="goodList-item-content">
								<view class="fs15">
									微信定制版V1.3
								</view>
								<!-- <uni-tag text="支持多开" type=""></uni-tag> -->
								<view class="fs10 tag">
									<span>支持多开</span>
									<span>支持多开</span>
									<span>支持多开</span>
								</view>
								<view class="fs12">
									发放海量福利
								</view>
							</view>
							<button class="goodList-item-btn" @tap="toMake">获取</button>
						</view>
						<view class="goodList-item">
							<view class="goodList-item-img">
								<img src="../../static/wx.png" alt="">
							</view>
							<view class="goodList-item-content">
								<view class="fs15">
									微信定制版V1.3
								</view>
								<!-- <uni-tag text="支持多开" type=""></uni-tag> -->
								<view class="fs10 tag">
									<span>支持多开</span>
									<span>支持多开</span>
									<span>支持多开</span>
								</view>
								<view class="fs12">
									发放海量福利
								</view>
							</view>
							<button class="goodList-item-btn" @tap="toMake">获取</button>
						</view>
						<view class="goodList-item">
							<view class="goodList-item-img">
								<img src="../../static/wx.png" alt="">
							</view>
							<view class="goodList-item-content">
								<view class="fs15">
									微信定制版V1.3
								</view>
								<!-- <uni-tag text="支持多开" type=""></uni-tag> -->
								<view class="fs10 tag">
									<span>支持多开</span>
									<span>支持多开</span>
									<span>支持多开</span>
								</view>
								<view class="fs12">
									发放海量福利
								</view>
							</view>
							<button class="goodList-item-btn" @tap="toMake">获取</button>
						</view>
					</view>
				</van-tab>
			</van-tabs>

		</view>


	</view>
</template>

<script>
	import {
		Tab,
		Tabs
	} from 'vant';
	export default {
		components: {
			[Tab.name]: Tab,
			[Tabs.name]: Tabs,
		},
		data() {
			return {
				searchValue: '',
				tabList: ['热门商家', '免费试用', '虚拟视频', '热门商家', '免费试用', '虚拟视频']
			}
		},
		methods: {
			toMake(){
				uni.navigateTo({
					url:`/pages/make/index`,
				})
			}
		}
	}
</script>

<style lang="scss">
	.search {
		position: relative;
		box-sizing: border-box;
		height: 64upx;
		line-height: 64upx;
		padding-left: 80upx;
		padding-top: 20upx;
		font-size: 12px !important;
		background-color: #f8f8f8;
		border-radius: 10upx;

		&:before {
			content: url('../../static/icon/search.svg');
			position: absolute;
			width: 40upx;
			height: 40upx;
			left: 20upx;
			top: 11upx;
		}

		&::after {
			content: url('../../static/icon/camera.svg');
			position: absolute;
			width: 40upx;
			height: 40upx;
			right: 20upx;
			top: 11upx;
		}
	}

	.swiper {
		height: 400upx;
		margin-top: 42upx;
		margin-bottom: 20upx;
		border-radius: 30upx;
		overflow: hidden;
	}

	.goodList {

		// flex-wrap: nowrap;
		margin-top: 40upx;

		&-item {
			display: flex;
			height: 170upx;
			margin-bottom: 40upx;
			border-bottom: 1upx solid #f6f6f6;

			&-img {
				width: 140upx;
				height: 140upx;

				img {
					width: 140upx;
					height: 140upx;
				}
			}

			&-content {
				margin-left: 20upx;

				.tag {
					margin-top: 10upx;
					margin-bottom: 14upx;
					color: #EA0000;

					span {
						padding: 6upx;
						border-radius: 10upx;
						margin-right: 10upx;
						background-color: #FFC7C7;
					}
				}
			}

			&-btn {
				width: 132upx;
				height: 60upx;
				margin-top: 46upx;
				line-height: 60upx;
				color: #FFF;
				font-size: 28upx;
				font-weight: bold;
				border-radius: 60upx;
				background: #3276F3;
			}
		}
	}
</style>